/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package IDE_formularios;
import ConexaoDados.ConexaoMySQL;
import ConexaoDados.InteracaoDados;
import OPC.ConexaoOPC;
import OPC.OPCException;
import java.awt.Color;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafish.clients.opc.exception.*;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JOptionPane;


/**
 *
 * @author erikjan
 */
public class CadastroServ extends javax.swing.JFrame {
         private boolean ativo;
         private int tempo;
         private int tempo_a;
         private ConsultaServidor consultaserv;
         
         
         
    /**
     * Creates new form CadastroServ
     */
    public CadastroServ() {
        initComponents();
        cbno.setEnabled(false);
        cbno.removeAllItems();
        cbno.addItem("");
        
        
        
    }
    
    
    private String[] listarItens() {
        String listaDeItens[] = null;
        try {
            listaDeItens = ConexaoOPC.getCurrentInstance().ListarDispositivos();
        } catch (ConnectivityException ex) {
            Logger.getLogger(CadastroServ.class.getName()).log(Level.SEVERE, null, ex);
        }
            
       

        if (listaDeItens == null) {
            listaDeItens = new String[0];
        }
        return listaDeItens;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jButton1 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        txtnome_servidor = new javax.swing.JTextField();
        txthost_servidor = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        txtno_servidor = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        cbtempoleitura = new javax.swing.JComboBox();
        jLabel4 = new javax.swing.JLabel();
        cbtempoatualizacao = new javax.swing.JComboBox();
        btsalvar = new javax.swing.JButton();
        btcancelar = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        rbativo = new javax.swing.JRadioButton();
        rbdesativo = new javax.swing.JRadioButton();
        jBconsulta_servidor = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jLabel6 = new javax.swing.JLabel();
        Label_status = new javax.swing.JLabel();
        cbno = new javax.swing.JComboBox();

        jButton1.setText("jButton1");

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Cadastro Servidor OPC");
        setPreferredSize(new java.awt.Dimension(560, 400));

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Dados do Servidor", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BELOW_TOP, new java.awt.Font("Tahoma", 1, 14))); // NOI18N

        jLabel1.setText("Nome:");
        jLabel1.setToolTipText("Nome do Servidor: ALIAS");

        txtnome_servidor.setToolTipText("Nome do Servidor: ALIAS");

        txthost_servidor.setToolTipText("Endreço de acesso do servidor, ex: localhost, 192.168.1.55.");

        jLabel2.setText("Host:");
        jLabel2.setToolTipText("Endreço de acesso do servidor, ex: localhost, 192.168.1.55.");

        jLabel5.setText("Nó:");
        jLabel5.setToolTipText("Nome de identificação da malha.");

        txtno_servidor.setToolTipText("Nome de identificação da malha.");

        jLabel3.setText("Tempo de Leitura");
        jLabel3.setToolTipText("Loop de aquisição de dados ou Tempo de Amostragem");

        cbtempoleitura.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1s", "2s", "3s", "4s", "5s" }));
        cbtempoleitura.setToolTipText("Loop de aquisição de dados ou Tempo de Amostragem");

        jLabel4.setText("Tempo de Avaliação");
        jLabel4.setToolTipText("Tempo Total de Avaliação");

        cbtempoatualizacao.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "4 Horas", "6 Horas", "8 Horas", "12 Horas", "24 Horas" }));
        cbtempoatualizacao.setToolTipText("Tempo Total de Avaliação");

        btsalvar.setText("Salvar");
        btsalvar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btsalvarActionPerformed(evt);
            }
        });

        btcancelar.setText("Cancelar");
        btcancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btcancelarActionPerformed(evt);
            }
        });

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Status", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BELOW_TOP));
        jPanel3.setToolTipText("Condição do servidor, se está disponivel para conexão ou não.");

        rbativo.setSelected(true);
        rbativo.setText("Ativo");

        rbdesativo.setText("Desativo");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(rbativo)
                .addGap(6, 6, 6)
                .addComponent(rbdesativo)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbdesativo)
                    .addComponent(rbativo))
                .addContainerGap(15, Short.MAX_VALUE))
        );

        jBconsulta_servidor.setText("Consultar");
        jBconsulta_servidor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBconsulta_servidorActionPerformed(evt);
            }
        });

        jButton2.setText("Nos");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jLabel6.setText("Status Servidor:");

        Label_status.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        Label_status.setForeground(new java.awt.Color(255, 0, 0));
        Label_status.setText("Não conectado!");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(btsalvar, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(btcancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jBconsulta_servidor, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jButton2)
                                .addGap(18, 18, 18)
                                .addComponent(cbno, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(cbtempoleitura, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel4)
                                .addGap(16, 16, 16)
                                .addComponent(cbtempoatualizacao, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(Label_status, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel1))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(txthost_servidor, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtnome_servidor, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtno_servidor, javax.swing.GroupLayout.PREFERRED_SIZE, 399, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(txtnome_servidor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(txthost_servidor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtno_servidor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(cbtempoleitura, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4)
                    .addComponent(cbtempoatualizacao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btsalvar, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btcancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jBconsulta_servidor, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton2)
                            .addComponent(cbno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(Label_status))
                .addGap(7, 7, 7))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(31, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(26, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btsalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btsalvarActionPerformed
        
        if (rbativo.isSelected())
        { 
         ativo = true;
        }
        else if (rbdesativo.isSelected())
        {
         ativo = false;
         }
        switch (cbtempoatualizacao.getSelectedItem().toString()) {
            case "4 Horas":
                tempo = 4;
                break;
            case "6 Horas":
                tempo = 6;
                break;
            case "8 Horas":
                tempo = 8;
                break;
            case "12 Horas":
                tempo = 12;
                break;
            case "24 Horas":
                tempo = 24;
                break;
        }
        switch (cbtempoleitura.getSelectedItem().toString()) {
            case "1s":
                tempo_a = 1000;
                break;
            case "2s":
                tempo_a = 2000;
                break;
            case "3s":
                tempo_a = 3000;
                break;
            case "4s":
                tempo_a = 4000;
                break;
            case "5s":
                tempo_a = 5000;
                break;
        }
        
        String host = txthost_servidor.getText().toString();
        //String no = txtno_servidor.getText().toString();
        String no = cbno.getSelectedItem().toString();
        String nome = txtnome_servidor.getText().toString();
        
              
        
         
        try {  
            
            Connection conexao = ConexaoMySQL.IniciaConexao();
            if((conexao.isClosed() != true) && (!"".equals(txtnome_servidor.getText().toString())) && (!"".equals(txthost_servidor.getText().toString())))
            //se existir uma conexão aberta e os campos não forem nulos, continue.    
             {
             System.out.println("Conexão realizada."+conexao.isClosed());
             
             //chama classe que contem rotina de inserir dados na tabela
             InteracaoDados gravar = new InteracaoDados();
             gravar.insereDados(nome, host, no, ativo, tempo_a, tempo);
             //fim da gravacao.

             }
            else
            {
            JOptionPane.showMessageDialog(null, "Preencha todos os campos!", "Atencao! Campos em branco", JOptionPane.INFORMATION_MESSAGE);    
            }
            
            if((conexao.isClosed()!= true))//verifica se tem uma conexão aberta
            {
            conexao.close();//fechar conexao
            System.out.println("Conexão encerrada."+conexao.isClosed());
            }
  
            } 
            catch (Exception e) 
            { 
             //JOptionPane.showMessageDialog(null, "Erro de conexão", "Erro", JOptionPane.INFORMATION_MESSAGE);   
             e.printStackTrace();  
            }  

    }//GEN-LAST:event_btsalvarActionPerformed

    private void btcancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btcancelarActionPerformed
        dispose();
    }//GEN-LAST:event_btcancelarActionPerformed

    private void jBconsulta_servidorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBconsulta_servidorActionPerformed
        try {
            consultaserv = new ConsultaServidor();
        } catch (SQLException ex) {
            Logger.getLogger(CadastroServ.class.getName()).log(Level.SEVERE, null, ex);
        }
         consultaserv.setVisible(true);
        
        
        
    }//GEN-LAST:event_jBconsulta_servidorActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        String Listaitens[] = null;
        
        String host = txthost_servidor.getText();
        String servidor = txtnome_servidor.getText();
        
        
        ConexaoOPC.newInstance(host, servidor, 1);//cria uma instacia de conecção com o servidor OPC desejado
        
          
          try {
            ConexaoOPC.getCurrentInstance().conectar();//faz a chamada de conexao do OPC usando a classe ConexaoOPC
            
            } catch (OPCException | UnableAddGroupException | ConnectivityException | UnableAddItemException ex) {
             Label_status.setForeground(Color.red);
             Label_status.setText("Falha na conexao!");
             JOptionPane.showMessageDialog(null, "Não foi possivel conectar ao servidor", "Atenção!", JOptionPane.ERROR_MESSAGE);
            ConexaoOPC.finalizar();
            return;
            }
          
          if (ConexaoOPC.isConnected()==true)
          {
              Label_status.setForeground(Color.GREEN);
              Label_status.setText("Conectado!");
              Listaitens = listarItens();//chama a função que procura todos os nó´s do servidor que está conectado
              DefaultComboBoxModel cmbModel = new DefaultComboBoxModel(Listaitens);//cria um modelo padronizado dos dados para ComboBox
              cbno.setModel(cmbModel);//carrega os dados no combobox
              cbno.setEnabled(true);
              ConexaoOPC.finalizar();
          }
        
      
          
          
        
    }//GEN-LAST:event_jButton2ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(CadastroServ.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(CadastroServ.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(CadastroServ.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(CadastroServ.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new CadastroServ().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel Label_status;
    private javax.swing.JButton btcancelar;
    private javax.swing.JButton btsalvar;
    private javax.swing.JComboBox cbno;
    private javax.swing.JComboBox cbtempoatualizacao;
    private javax.swing.JComboBox cbtempoleitura;
    private javax.swing.JButton jBconsulta_servidor;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JRadioButton rbativo;
    private javax.swing.JRadioButton rbdesativo;
    private javax.swing.JTextField txthost_servidor;
    private javax.swing.JTextField txtno_servidor;
    private javax.swing.JTextField txtnome_servidor;
    // End of variables declaration//GEN-END:variables
}
